// ChessBoard.h: interface for the CChessBoard class.
//
//////////////////////////////////////////////////////////////////////

#if !defined(AFX_CHESSBOARD_H__8048FC30_A1FE_4109_989B_198711F4D771__INCLUDED_)
#define AFX_CHESSBOARD_H__8048FC30_A1FE_4109_989B_198711F4D771__INCLUDED_

#include "CBData.h"	// Added by ClassView
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000

class CChessBoard  
{
public:
	void CoverChess(CDC *pDC,int x,int y);
	void FlashChess(CDC *pDC);
	int GetCurrentPlayer();
	int PutChess(int x,int y);
	bool GetPos(CPoint &pt,int& x,int& y);

	void DrawChess(CDC *pDC,int x,int y);
	void DrawAll(CDC *pDC);
	void DrawFocusRect(CDC *pDC,CPoint &pt);

	void Init();
	CChessBoard();
	~CChessBoard();

private:
	bool TestGameOver(int x,int y);
	int TestGameOverHelper(int x,int y,int dx,int dy);
	void DrawMarkPoint(CDC *pDC,int x,int y);
	void SwitchPlayer();
	int m_size;
	char m_currentPlayer;
	CCBData m_data;

	friend class CComputerPlayer;
};

#endif // !defined(AFX_CHESSBOARD_H__8048FC30_A1FE_4109_989B_198711F4D771__INCLUDED_)
